@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

:root {
  /* sanity variables */
  --brand-primary: #000000;
  --brand-primary--inverted: #ffffff;
  --brand-secondary: #000000;
  --brand-secondary--inverted: #ffffff;

  --main-navigation-color: var(--brand-primary);
  --main-navigation-color--inverted: var(--brand-primary--inverted);

  /* custom variables */
  --pt-bg: #ffffff;
  --pt-text: #000000;

  --button-bg: #000000;
  --button-text: #ffffff;

  --button-bg-active: rgba(0, 0, 0, 0.15);
  --button-text-active: #000000;
}

/* theme UI overrides */

[data-scheme='dark'] [data-ui='CollapseMenu'] [data-selected] > span {
  background: var(--brand-primary--inverted) !important;
}
[data-scheme='dark'] [data-ui='CollapseMenu'] [data-selected] [data-ui='Text'] {
  color: var(--brand-primary) !important;
}

[data-scheme='dark']
  [data-ui='CollapseMenu']
  [data-ui='CollapseMenuButton']:active {
  background: hsla(0, 0%, 100%, 25%) !important;
}

[data-scheme='dark']
  [data-ui='CollapseMenu']
  [data-ui='CollapseMenuButton']:active
  [data-ui='Text'] {
  color: var(--brand-primary--inverted) !important;
}

[data-ui='PaneItem'][data-pressed],
[data-ui='PaneItem'][data-selected],
[data-ui='Button'][data-pressed],
[data-ui='Button'][data-selected],
[data-ui='Tab'][data-selected] {
  background: var(--button-bg) !important;
  border-color: var(--button-bg) !important;
}

[data-ui='PaneItem']:active,
[data-ui='Button']:active,
[data-ui='Tab']:active {
  background: var(--button-bg-active) !important;
}

[data-ui='PaneItem'][data-pressed] [data-ui='Text'],
[data-ui='PaneItem'][data-pressed] [data-ui='Flex'],
[data-ui='PaneItem'][data-selected] [data-ui='Text'],
[data-ui='PaneItem'][data-selected] [data-ui='Flex'],
[data-ui='Button'][data-pressed] [data-ui='Text'],
[data-ui='Button'][data-pressed] [data-ui='Flex'],
[data-ui='Button'][data-selected] [data-ui='Text'],
[data-ui='Button'][data-selected] [data-ui='Flex'],
[data-ui='Tab'][data-selected] [data-ui='Text'],
[data-ui='Tab'][data-selected] [data-ui='Flex'] {
  color: var(--button-text) !important;
}

[data-ui='PaneItem']:active [data-ui='Text'],
[data-ui='PaneItem']:active [data-ui='Flex'],
[data-ui='Button']:active [data-ui='Text'],
[data-ui='Button']:active [data-ui='Flex'],
[data-ui='Tab']:active [data-ui='Text'],
[data-ui='Tab']:active [data-ui='Flex'] {
  color: var(--button-text-active) !important;
}

[data-ui='Tab']:focus:not(:focus-visible) {
  box-shadow: inset 0 0 0 1px var(--button-bg-active) !important;
}

[data-ui='Tab'][data-selected] {
  box-shadow: inset 0 0 0 1px var(--button-bg) !important;
}

/* more natural cursors for studio elements */

button:not([disabled]),
[data-ui='Button']:not([disabled]),
[data-ui='Button']:not([disabled]) input[type='file'] {
  cursor: pointer !important;
}

[data-pane-collapsed] * {
  cursor: e-resize !important;
}

/* custom portable text styles */

[data-slate-editor] {
  background: var(--pt-bg);
  color: var(--pt-text);
}

.pt-editable * {
  font-family: 'Inter', 'Helvetica Neue', sans-serif !important;
  color: var(--pt-text);
}

.btn {
  display: inline-block;
  position: relative;
  padding: 0.5rem 1.25rem;
  background: var(--button-bg) !important;
  color: var(--button-text) !important;
  border: 1px solid;
  border-radius: 9999px;
  box-shadow: 0 0 0 5px var(--pt-bg); // covers the Sanity link outline
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
}

.btn * {
  font-weight: 600;
}

.btn.is-primary {
  background: var(--button-text) !important;
  color: var(--button-bg) !important;
  border-color: var(--button-bg);
}

.btn.is-white {
  background: white !important;
  color: black !important;
  border-color: white;
  box-shadow: 0 0 0 5px var(--pt-bg), 0 0 10px 5px hsla(0, 0%, 0%, 25%);
}

.btn.is-large {
  padding: 0.5rem 1.75rem;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 400;
}

.btn.is-large * {
  font-weight: 400;
}

.btn.is-block {
  box-sizing: border-box;
  width: 100%;
  text-align: center;
}
